//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "fn_nearAmmoBox.sqf"
#include <btc_macros.h>
TRACE_1("Start",_this);

private ["_vec","_boxes","_result"];
DEFAULT_PARAM(_vec,0,objNull);

_result = false;
if (!(isNull _vec)) then {
	_boxes = nearestObjects [_vec, BTC_Ammo_Box_TypeList, 8];
	{ if (_x getVariable ["BTC_AMMO_BOX",false]) exitWith { _result = true; };
	} foreach _boxes;
};
TRACE_1("End",_result);
_result